package com.hs.jhzd.entity;

import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

@Entity
@Data
@Table(name = "jh_spddxxb")
public class OrderForm {
  @Id
  @Column(name = "ZYBH")
  private String id;
  @Column(name = "KH")
  private String cardId;

  @Column(name = "CJSJ",updatable = false)
  @CreationTimestamp
  @Temporal(TemporalType.TIMESTAMP)
  private Date createTime;

  @Column(name = "ZZJG")
  private Double finalPrice;

  @Column(name = "JSH")
  private String jsh;

  @Column(name = "XM")
  private String prisonerName;

  @Column(name = "RYBH")
  private String rybh;// rybh

  @Column(name = "ZT")
  private String status;// 未发货/已发货/已签收/

  @Column(name = "DDZJ")
  private Double totalPrice;

  @Column(name = "SJC",updatable = true)
  @CreationTimestamp
  @Temporal(TemporalType.TIMESTAMP)
  private Date sjc;

  @Column(name = "JSBH")
  private String jsbh;

  @Column(name = "JSMC")
  private String jsmc;

  @Column(name = "SPR")
  private String spr;

  @Column(name = "SPSJ")
  private String spsj;

  @Column(name = "SCBJ", columnDefinition = "tinyint default 0")
  private Integer scbj;

  @Column(name = "SPYJ")
  private String spyj;

  @Column(name = "SPYY")
  private String spyy;

  @OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)//级联保存、更新、删除、刷新;延迟加载
  private List<OrderGoods> orderGoods;
}
